
;window.Shuffle = function(m) //洗牌 //换牌法
{
	//生成m张牌
	var arr = new Array(m);
	for (var i=0; i<m; i++) {
		arr[i] = i;
	}

	//第i张与任意一张牌换位子，换完一轮即可
	for (var i=0; i<m; i++) {
		var rnd = Math.floor(Math.random()*(i+1)),
			temp = arr[rnd];
		arr[rnd] = arr[i];
		arr[i]=temp;
	}
	return arr;
};